<template>
    <div>
        <div class="orderPayManner" v-for="(item,index) in data" >
            <div class="orderPayManner-platform"><img :src="item.img" alt=""> <span>{{item.title}}</span></div>
            <div class="orderPayManner-radio">
                <van-radio-group v-model="radio">
                    <van-radio :name="item.id" icon-size=".4rem"></van-radio>
                </van-radio-group>
            </div>
        </div>
    </div>
</template>

<script>
export default {
data() {
    return {
        // 如何绑定radio的指向为被点击复选框的索引
      radio: '0',
    };
  },
props:["data"],
};
</script>
<style lang="less" scoped>
    .orderPayManner{
        display: flex;
        justify-content: space-between;
        margin-bottom: 63px;
        // 支付平台
        .orderPayManner-platform{
            img{
                display: inline-block;
                width: 35px;
                height: 35px;
                vertical-align: -2px;
                margin: 0 0 0 42px;
            }
            span{
                margin-left: 2px;
                color: #898989;
            }
        }
        // 单选框
        .orderPayManner-radio{
            margin-right: 35px;
            margin-top: 10px;
        }
    }
    .orderPayManner:last-of-type{
        padding-bottom: 48px;
    }

</style>